package com.example.mybatis.sqlserver.springbootmybatissqlserver.repository.mapper;

import com.example.mybatis.sqlserver.springbootmybatissqlserver.pojo.bean.CategoryBean;
import com.example.mybatis.sqlserver.springbootmybatissqlserver.pojo.bean.CategoryPropertyNameBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * Created by hzy on 2019/2/19.
 */
@Mapper
public interface ICategoryMapper {

    int insert(CategoryBean categoryBean);

    CategoryBean selectByPrimaryKey(String parentCategoryId);

    int updateByPrimaryKeySelective(CategoryBean bean);

    List<CategoryBean> selectByParentId(@Param("parentId") String parentId);

    int deleteByPrimaryKey(@Param("id") String categoryId);

    int updateSoftDeleteFiled(@Param("id") String categoryId, @Param("isDelete") boolean isDelete);

    List<CategoryBean> selectAll();

    // databaseId 属性值功能测试
    String selectTime();

    List<CategoryBean> findCategoryByPaging(@Param("offset") int offset, @Param("pageSize") int pageSize);
}
